{% extends 'base.html' %}

{% block content %}
  <p>{{ moviesList|length }} Titles</p>
  <form method="post">
    <label>
      Name <input type="text" name="title" autocomplete="off" required>
    </label>
    <label>
      Year <input type="text" name="year" autocomplete="off" required>
    </label>
    <input class="btn" type="submit" name="submit" value="Add">
  </form>
  <ul class="movie-list">
    {% for movie in moviesList %}
      <li>{{ movie.movie_title }} - {{ movie.movie_year }}
      </li>
    {% endfor %}
  </ul>
  <img alt="Walking Totoro" class="totoro" src="{{ url_for('static', filename='images/totoro.gif') }}"
       title="to~to~ro~">
{% endblock %}